package com.lemonsama.lesson3;

import java.awt.*;

public class MyPaint extends Frame {

    public void loadFrame() {
        setBounds(200, 200, 600, 500);
        setVisible(true);
    }

    @Override
    public void paint(Graphics g) {
        //画笔需要有颜色
        g.setColor(Color.RED);
        g.drawOval(100, 100, 100, 100);
        g.fillOval(100, 100, 100, 100);//实心圆

        g.setColor(Color.GREEN);
        g.fillRect(150, 200, 200, 200);

        //画笔用完，还原到最初的颜色
        g.setColor(Color.BLACK);
    }
}
